﻿namespace WebSocketApi.Extensions;

/// <summary>
/// Socket用户管理
/// </summary>
public interface ISocketUserManagerService
{
    /// <summary>
    /// 保存连接用户
    /// </summary>
    /// <param name="userInfo"></param>
    /// <returns></returns>
    Task AddUser(SocketUserInfo userInfo);

    /// <summary>
    /// 删除用户(断开连接，超时清理)
    /// </summary>
    /// <param name="userAccount"></param>
    /// <returns></returns>
    Task RemoveUser(string userAccount);
    /// <summary>
    /// 
    /// </summary>
    /// <param name="userAccount"></param>
    /// <returns></returns>
    Task<SocketUserInfo> GetUserInfo(string userAccount);


}
